package com.rabbiter.oes.serviceimpl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.rabbiter.oes.entity.MultiQuestion;
import com.rabbiter.oes.mapper.MultiQuestionMapper;
import com.rabbiter.oes.service.MultiQuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.function.Function;

@Service
public class MultiQuestionServiceImpl implements MultiQuestionService {

    @Autowired
    private MultiQuestionMapper multiQuestionMapper;
    @Override
    public List<MultiQuestion> findByIdAndType(String PaperId) {
        return multiQuestionMapper.findByIdAndType(PaperId);
    }

    @Override
    public IPage<MultiQuestion> findAll(Page<MultiQuestion> page) {
        return multiQuestionMapper.findAll(page);
    }

    @Override
    public MultiQuestion findOnlyQuestionId() {
        return multiQuestionMapper.findOnlyQuestionId();
    }

    @Override
    public int add(MultiQuestion multiQuestion) {
        return multiQuestionMapper.add(multiQuestion);
    }

    @Override
    public List<MultiQuestion> findRandom( Integer count,String subject) {
        return multiQuestionMapper.findRandom( count,subject);
    }

    @Override
    public List<Integer> findBySubject(String subject, Integer pageNo) {
        return multiQuestionMapper.findBySubject(subject,pageNo);
    }

    @Override
    public int edit(MultiQuestion multiQuestion) {
        return multiQuestionMapper.edit(multiQuestion);
    }

    @Override
    public List<MultiQuestion> findSequence(String subject) {
        return multiQuestionMapper.findSequence(subject);
    }

    @Override
    public boolean saveBatch(Collection<MultiQuestion> entityList, int batchSize) {
        return false;
    }

    @Override
    public boolean saveOrUpdateBatch(Collection<MultiQuestion> entityList, int batchSize) {
        return false;
    }

    @Override
    public boolean updateBatchById(Collection<MultiQuestion> entityList, int batchSize) {
        return false;
    }

    @Override
    public boolean saveOrUpdate(MultiQuestion entity) {
        return false;
    }

    @Override
    public MultiQuestion getOne(Wrapper<MultiQuestion> queryWrapper, boolean throwEx) {
        return null;
    }

    @Override
    public Map<String, Object> getMap(Wrapper<MultiQuestion> queryWrapper) {
        return null;
    }

    @Override
    public <V> V getObj(Wrapper<MultiQuestion> queryWrapper, Function<? super Object, V> mapper) {
        return null;
    }

    @Override
    public BaseMapper<MultiQuestion> getBaseMapper() {
        return null;
    }

    @Override
    public Class<MultiQuestion> getEntityClass() {
        return null;
    }

    public List<MultiQuestion> findByExamCodeAndUserId(String PaperId, Long userId) {
        return multiQuestionMapper.findByExamCodeAndUserId(PaperId, userId);
    }
}
